//
//  HomePageCell7.m
//  Mtime2.0
//
//  Created by 凉气的Mac on 16/9/6.
//  Copyright © 2016年 凉气的Mac. All rights reserved.
//

#import "HomePageCell7.h"

#import "HomePageModel.h"

#import <UIImageView+WebCache.h>

@implementation HomePageCell7




-(void)setupUI{

    [super setupUI];
    
    [self.titleLable mas_updateConstraints:^(MASConstraintMaker *make) {
        
        make.right.equalTo(self.contentView).offset(-15);
        
    }];
    
    [self.picture mas_remakeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.commentLbel.mas_bottom).offset(10);
        
        make.height.equalTo(@200);
        
        make.left.equalTo(self.contentView).offset(15);
        
        make.width.equalTo(self.contentView).multipliedBy(0.55);
        
        
    }];
    
    [self.timeLaber mas_remakeConstraints:^(MASConstraintMaker *make) {
        
        make.left.equalTo(self.contentView).offset(15);
        
        make.top.equalTo(self.picture.mas_bottom).offset(10);
        
        make.bottom.equalTo(self.contentView).offset(-20);
        
    }];
    
    [self.commentCountLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.timeLaber);
        
        make.left.equalTo(self.timeLaber.mas_right).offset(20);
        
    }];
    
    
    UIImageView *picture2 = [[UIImageView alloc]init];
    
    [self.contentView addSubview:picture2];
    
    self.picture2 = picture2;
    
    [picture2 mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.top.equalTo(self.picture);
        
        make.right.equalTo(self.contentView).offset(-10);
        
        make.left.equalTo(self.picture.mas_right).offset(5);
        
        make.height.equalTo(self.picture).multipliedBy(0.5).offset(-2.5);
        
    }];
    
    UIImageView *picture3 = [[UIImageView alloc]init];
    
    self.picture3 = picture3;
    
    [self.contentView addSubview:picture3];
    
    [picture3 mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.height.width.left.equalTo(picture2);
        
        make.top.equalTo(picture2.mas_bottom).offset(5);
        
    }];
    

}


-(void)setModel:(HomePageModel *)model{

    [super setModel:model];
    
 
    [self.picture2 sd_setImageWithURL:[NSURL URLWithString:model.img2]];
    
    [self.picture3 sd_setImageWithURL:[NSURL URLWithString:model.img3]];
    

}

@end





























